<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h2>这是注册页面</h2>
    <form id="register_form">
        用户名称：<input type="text" name="userName"><br>
        用户密码：<input type="text" name="userPassword"><br>
        用户真实姓名：<input type="text" name="userRealName"><br>
        用户性别：<input type="radio" name="userSex" value="男">男
                <input type="radio" name="userSex" value="女">女<br>
        用户邮箱：<input type="text" name="userEmail"><br>
        用户电话：<input type="number" name="userMobile"><br>
        起始时间：<input type="date" name="userSDate"><br>
        结束时间：<input type="date" name="userEDate"><br>
        状态：<input type="radio" name="status" value="良好">良好
            <input type="radio" name="status" value="差">差<br>
        时间：<input type="date" name="addTimeDatetime"><br>

        <button id="register" type="button">点击注册</button>
        <a href="login.html">返回</a>
    </form>
    <script src="style/jquery-3.3.1.js"></script>
    <script>
        $("#register").click(function (){
            $.ajax({
                type:"post",
                url:"UserController/register",
                dataType:"json",
                data:$("#register_form").serialize(),
                success:function (data){
                    alert(data.message);
                    location.href="register.html";
                }
            })
        })
    </script>
</body>
</html>